/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.source.entity.alarm;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 警告资源管理Entity
 * @author ZC
 * @version 2017-04-23
 */
@XmlType(name="alarm") 
public class EleSourceAlarm extends DataEntity<EleSourceAlarm> {
	
	private static final long serialVersionUID = 1L;
	private EleSourceAlarmGroup group;		// 声音资源 父类
	private String type;		// 警告类型
	private String volume;		// 声音路径
	private String image;		// 图片路径
	
	public EleSourceAlarm() {
		super();
	}

	public EleSourceAlarm(String id){
		super(id);
	}

	public EleSourceAlarm(EleSourceAlarmGroup group){
		this.group = group;
	}
	@XmlTransient
	@Length(min=0, max=100, message="声音资源长度必须介于 0 和 100 之间")
	public EleSourceAlarmGroup getGroup() {
		return group;
	}

	public void setGroup(EleSourceAlarmGroup group) {
		this.group = group;
	}
	
	@XmlElement(name = "type")
	@Length(min=0, max=255, message="警告类型长度必须介于 0 和 255 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@XmlElement(name = "volume")
	public String getVolume() {
		return volume;
	}

	public void setVolume(String volume) {
		this.volume = volume;
	}
	
	@XmlElement(name = "image")
	@Length(min=0, max=255, message="图片路径长度必须介于 0 和 255 之间")
	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
	
}